package com.woniu.ribbon.config;


import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfig {
    @Bean
    public IRule creatIrule(){
        //cluster扫不到，这里注入通过ribbonclinents注解去获取
        //我们自己的负载均衡方法
        return new ClusterWeightRule();
    }
}
